from django.conf.urls import *

from answer.views import AnswerCreateView, AnswerListView, AnswerDetailView, AnswerUpdateView, AnswerDeleteView, \
    praise_answer, AnswerFocusListView, AnswerFocusCreateView, AnswerFocusDeleteView

urlpatterns = [
    url(r'^create/$', AnswerCreateView.as_view(), name='answer_create'),
    url(r'^list/$', AnswerListView.as_view(), name='answer_list'),
    url(r'^(?P<pk>\d+)/detail/$', AnswerDetailView.as_view(), name='answer_detail'),
    url(r'^(?P<pk>\d+)/update/$', AnswerUpdateView.as_view(), name='answer_update'),
    url(r'^(?P<pk>\d+)/delete/$', AnswerDeleteView.as_view(), name='answer_delete'),

    url(r'^praise/(?P<pk>\d+)/$', praise_answer, name='praise_answer_view'),

    url(r'^focus/list$', AnswerFocusListView.as_view()),
    url(r'^focus/create$', AnswerFocusCreateView.as_view()),
    url(r'^focus/delete/(?P<answer>\d+)$', AnswerFocusDeleteView.as_view()),

]
